<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        ul{
            list-style-type: none;
        }
        li{
            float: left;
            width: 200px;
            height: 50px;
            overflow: hidden;
            margin-left: 10px;
        }
        .p{
            width: 200px;
            height: 50px;
            background-color: lawngreen;
            text-align: center;
            line-height: 50px;
            overflow: hidden;
            transition: 0.5s;
        }
        .ps{
            width: 200px;
            height: 50px;
            background-color: khaki;
            text-align: center;
            line-height: 50px;
        }
        li:hover>.p{
            height: 0;
        }
    </style>
</head>
<body>
    <ul>
        <li>
            <p class="p">首页</p>
            <p class="ps">首页</p>
        </li>
        <li>
            <p class="p">视频</p>
            <p class="ps">视频</p>
        </li>
        <li>
            <p class="p">电影</p>
            <p class="ps">电影</p>
        </li>
    </ul>
</body>
</html>